#include <iostream>
using namespace std;

void print(const char* p) {
    if(p) {
        while(*p != '\0') {
            cout << *p++ << " ";
        }
    }
    cout << endl;
}

void test() {
    const char *p = "Hello";
    print(p);
    char p2[] = "Hello World";
    print(p2);
    print("Hi World");
}

int main() {
    test();
    return 0;
}